package com.lumlord.common.base;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lumlord.common.annotation.mybatis.SqlInjection;
import com.lumlord.common.annotation.mybatis.SqlInjectionColumn;
import com.lumlord.common.annotation.mybatis.SqlInjectionType;
import com.lumlord.common.annotation.pojo.IgnoreColumn;

/**
 * 
 * @author gpf
 * db 反射基础类
 *
 */
public class BaseEntity {

	/** 添加时间 **/
	@SqlInjection(types = SqlInjectionType.INSERT, column = SqlInjectionColumn.DATE)
	private Date addTime;

	/** 修改时间 **/
	@SqlInjection(types = { SqlInjectionType.INSERT, SqlInjectionType.UPDATE }, column = SqlInjectionColumn.DATE)
	private Date updateTime;

	/** 添加用户 **/
	@SqlInjection(types = { SqlInjectionType.INSERT, SqlInjectionType.QUERY }, column = SqlInjectionColumn.USER)
	private Integer addUser;
	
	
	/** 修改用户 **/
	@SqlInjection(types = { SqlInjectionType.INSERT, SqlInjectionType.UPDATE }, column = SqlInjectionColumn.USER)
	private Integer updateUser;

	/** 项目ID **/
	@SqlInjection(types = { SqlInjectionType.INSERT, SqlInjectionType.DEL, SqlInjectionType.QUERY,
			SqlInjectionType.UPDATE }, column = SqlInjectionColumn.PROJECT)
	@IgnoreColumn
	private Integer projectId;

	/** 逻辑删除 0 表示不删除 ，1表示删除 **/
	@SqlInjection(types = { SqlInjectionType.INSERT, SqlInjectionType.DEL, SqlInjectionType.QUERY,
			SqlInjectionType.UPDATE }, defval = "0")
	@JsonIgnore  //返回时排除掉这个字段
	private Integer state; //逻辑删除

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getAddUser() {
		return addUser;
	}

	public void setAddUser(Integer addUser) {
		this.addUser = addUser;
	}

	public Integer getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(Integer updateUser) {
		this.updateUser = updateUser;
	}

	public Integer getProjectId() {
		return projectId;
	}

	public void setProjectId(Integer projectId) {
		this.projectId = projectId;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}
	
}
